#ifndef _UTILS_HPP_
#define _UTILS_HPP_

/*
*	Author: Jacob Dufalt
*	Date:	July 9, 2009
*
*	Desc:	A group of functions that offer great utility!
*/
#include <sstream>

namespace klasPhysics
{
	// Returns the string of any object with an overridden << parameter.
	template<class T>
	static string GetString(const T& t)
	{
		std::stringstream ss;
		ss << t;
		return ss.str();
	}

	inline int Index3D(int i, int j, int k, int num_rows, int num_cols)
	{
		return i*num_rows*num_cols + j*num_cols + k;
	}
}
#endif